<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMedioTransporte extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('medio_transporte', function (Blueprint $table) {
            $table->increments('id_medioT');
            $table->integer('id_lugar');
            $table->string('tipo',30);
            $table->string('descr',100);

            //            $table->primary('id_medioT');
            $table->foreign('id_lugar')->references('id_lugar')->on('lugar');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('medio_transporte');
    }
}
